<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="../../../lib/汇 .ico">
    <link rel="stylesheet" href="../../lib/font-awesome-4.7.0/css/font-awesome.min.css">
    <title>登录 | 汇客网</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            color: #333!important;
            font-family: 微软雅黑;
        }
        #login_div,#login_img{
            display: inline-block;
            height: 370px;
            margin: auto;
        }
        #login_div{
            margin-left: 50px;
        }
        input{
            border: none;
            outline: none;
        }
        .info_img{
            width: 480px;
            height: 370px;
        }
        .info_input{
            width: 270px;
            height: 36px;
            border:1px solid #858585;
            line-height: 36px;
            margin-top:  20px ;
            margin-left: 20px;
        }
        #login_button{
            width: 270px;
            height: 36px;
            border-radius: 3px;
            text-align: center;
            line-height: 36px;
            cursor: pointer;
            background: #FFC200 no-repeat;
            margin-left: 20px;
        }
        #login_div{
            position: relative;
            top: -80px;
        }
        a{
            color: #FE8C00;
            text-decoration: none;
        }
        #alert{
            position: absolute;
            width: 270px;
            height: 40px;
            border: 1px solid orange;
            margin-left: 20px;
            background: #FFF6DB;
            padding-left: 5px;
           
            line-height: 40px;
            display: none;
            top: -40px;
            border-radius: 5px;
          
        }
        .img-content{
            position: relative;
            font-size: 20px;
            color: #FE8C00;
            top: -10px;
            left: 5px;
            letter-spacing: -1px;
        }
        .alert-info{
            float: left;
            margin-left: 5px;
        }
        .other{

       margin-top: 30px;
       font-size: 15px;
       margin-left: 20px;
   }
 
   .other-title{
     border-top:1px solid gray;
     margin-bottom: 20px;
     position: relative;
   }
   .other-title>.title{
       position: absolute;
       height: 30px;
       width: 150px;
       background: white;
       text-align: center;
       line-height: 30px;
       top: -16px;
       left: 58px;
   }
   .other>i{
    display: block;
       width: 20px;
       height: 20px;
       margin-left: 20px;
       color: white;
       float: left;
       text-align: center;
       line-height: 20px;
   }
   .foot{
       width: 100%;
       height: 50px;
       border-top: 1px solid #EEEEEE;
       border-bottom: 1px solid #EEEEEE;
       line-height: 50px;
       color: #858585;
       font-size: 15px;
   }
   .foot ul {
       margin-left: 50px;
   }
   .foot ul li{
       list-style: none;
       float: left;
       margin-right: 15px;
       cursor: pointer;
   }
   .quarantine{
      border: 1px solid #EEEEEE;
      height: 15px;
      margin-top: 12px;
   }
        @media screen and (max-width:992px) {
            #login_img{
                display: none;
            }
            #login_div{
                margin-left: 30px;
                top: 50px;

            }
            .foot{
                margin-top: 50px;
            }
        }
    </style>
</head>
<body>
    <div class="title" style="margin: auto;width: 1000px;"><img id="home" style= "cursor: pointer; width: 100px; height: 50px;" src="images/汇客橙S.png" alt=""><div class="img-content">huike.com</div>
</div>
    <div class="container" style="margin: auto;width: 1000px;">
        <div id="login_img">
            <img src="images/login.jpg" alt="">
            
        </div>
        <div id="login_div">
            <div id="alert">
               <i style="margin-top: 11px; color: #FE8C00; float: left;" class="fa fa-minus-circle"></i> <div class="alert-info"></div> 
            </div>
            <p style="margin-left: 20px; margin-top: 10px;">账号登录</p>
            <div class="info_input">
                +86 > <input type="text"  placeholder="手机号" id="phonenumber">
            </div>
            <div class="info_input">
                <img src="images/password.png" alt="" style="margin: 3px;display: inline-block;">
                <input type="password" placeholder="密码" id="password" style="position: relative;top: -12px;left: 10px;">
                
        </div>
   
        <a href="" style="display: block; font-size: 15px; margin-left: 220px; margin-top: 10px; margin-bottom: 10px;">忘记密码？</a>
        <div id="login_button">登 录</div>
        <p style="margin-top:10px;margin-left: 20px;">还没有账号？<a href="../register/html/index.html">免费注册</a></p>
        <div class="other">
            <div class="other-title"><div class="title">用合作网站账号登录</div></div>
             <i style=" margin-left: 60px; background:skyblue;" class="fa fa-qq"></i>
             <i style="background:green;" class="fa fa-weixin"></i>
            
         </div>
    </div>
    <div class="login_buttom"></div>
    <div class="foot">
        <ul>
            <li>关于我们</li>
            <li class="quarantine"></li>
            <li>商家入驻</li>
            <li class="quarantine"></li>
            <li>帮助中心</li>
            <li class="quarantine"></li>
            <li>汇客手机端</li>
        </ul>
    </div>
    </div>
    <script src="../../lib/jquery-1.12.4.min.js"></script>
	<script>
		var namerule=/^1[35789]\d{9}$/;
        var pwdrule=/^(\d){6}$/;
     
        function judge(){
            var text=$('#phonenumber').val();
			var pwd=$('#password').val();
            if(text==""){
                $('.alert-info').text("请输入手机号!");
                $('#alert').show();
                return;
            }
            if(pwd==""){
                $('.alert-info').text("请输入密码!");
                $('#alert').show();
                return;
            }
            if(!namerule.test(text)){
                $('.alert-info').text("手机号格式不正确!");
                $('#alert').show();
                return;
            }
            if(!pwdrule.test(pwd)){
                $('.alert-info').text("密码格式不正确!");
                $('#alert').show();
                return;
            }
            if(namerule.test(text)&&pwdrule.test(pwd)){
                $('#alert').hide();
				$(location).attr('href','../homepage/html/index.html');
                
                return;
			}else{
                $('#alert').show();
                return;
			}
        }
		$('#login_button').on('click',function(){
			judge();
			
        });
        $('#home').on('click',function(){
            $(location).attr('href','../homepage/html/index.html');
        })
	</script>
</body>
</html>